﻿using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;

public class TipPanel : BasePanel
{
    public TMP_Text content;
    public Button btnSure;

    public UnityEvent onRegister;
    public override void Init()
    {
        btnSure.onClick.AddListener(() =>
        {
            UIManager.Instance.HidePanel<TipPanel>();
            if (onRegister != null)
            {
                onRegister.Invoke();
                onRegister.RemoveAllListeners();
            }
        });
    }

    public void InitContent(string remindContent)
    {
        content.text = remindContent;
    }
}
